<%@ include file="public/include.jsp" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
  <link rel="stylesheet" type="text/css" href="styles/pub/default.css" >
  <script type="text/javascript" src="scripts/pub/jquery.js"></script>
  <script type="text/javascript" src="scripts/pub/common.js"></script>
  <script type="text/javascript" src="scripts/pub/date.js"></script>
</head>

<body>
<div class="main" style="width:98%;">
	<form  action="DeclSearch.do" method="post">
			<table border="0" cellspacing="0" cellpadding="0" align="center">
			  <caption>
				  报检单列表
			  </caption>
			    <tr>
			      <td align="center">
			        <table border="0" style="width:75%;">
			          <tr>
			            <td width="22%"></td>
			            <td width="30%"></td>
			            <td width="12%"></td>
			            <td ></td>
			          </tr>
			          <tr height="25">
			            <td align="right">报检号</td>
			            <td><input type="text" name="declNo" value="${map.cdecl.declNo}"></td>
			            <td align="right">备案号</td>
			            <td><input type="text" name="applyCode" value="${map.cdecl.applyCode}"></td>
			          </tr>
			          <tr height="25">
			            <td align="right">报检单位</td>
			            <td><mytag:select type="entRegNo" name="entId" selectedCode="${map.cdecl.declRegNo}"/></td>
			            <td align="right">报检日期范围</td>
			            <td>
			            	<input type="text" class="readonly" name="inspDept4" value="${map.cdecl.inspDept4}" readonly="readonly" style="width:70px;" onclick="setday(this)">
				 			~
				 			<input type="text" class="readonly" name="inspDept5" value="${map.cdecl.inspDept5}" readonly="readonly" style="width:70px;" onclick="setday(this)">
			            </td>
			          </tr>
			          <tr height="25">
			          	<td align="right">CIQ综合评定</td>
				      	<td>
							<mytag:select type="testResult" name="colligateResult" selectedCode="${map.cdecl.colligateResult}"/>
					 	</td>
				    	<td align="right">监管</td>
				      	<td>
							<mytag:select type="Check_result" name="markNo" selectedCode="${map.cdecl.markNo}"/>
					 	</td>
			          </tr>
			          <tr class="button">
			            <td colspan="4">
			            	<input type="submit" value=" 查 询 " />&nbsp;
			              	<input type="button" value=" 清空 " onclick="clearInput();" />
			            </td>
			          </tr>
			        </table>
			      </td>
			    </tr>
			  
				<tr height="30">
				    <td align="center">
				    	<mytag:pagination pager="${map.page}" pageSize="10"  suppressHidden="true"/>
				    </td>
				</tr>
				<tbody>
				  <tr>
				    <td align="center">
				      <table class="list">
				        <tr class="title">
				          <td width="4%">序号</td>
				          <td>报检号</td>
				          <td>备案号</td>
				          <td width="35%">报检单位</td>
				          <td>报检日期</td>
				          <td>CIQ综合评定</td>
				          <td>监管</td>
				          <td>操作选择</td>
				        </tr>
						<c:forEach items="${map.page.items}" varStatus="stat" var="decl">
					        <tr>
					          <td>${stat.count+map.page.seq}</td>
					          <td>${decl.declNo}</td>
					          <td>${decl.applyCode}</td>
					          <td>${decl.entName}</td>
					          <td><fmt:formatDate value="${decl.declDate}" pattern="yyyy-MM-dd"/> </td>
					          <td><mytag:c2s type="testResult" key="${decl.colligateResult}"/></td>
					          <td>
					          	<c:if test="${decl.supervisePlan!=null}">
						          	<mytag:c2s type="Check_result" key="${decl.supervisePlan.result}"/>
					          	</c:if>
					          </td>
					          <td>
					          	<security:authorize ifAnyGranted="ROLE_DECL_VIEW">
			            			<a class="deco" href="DeclView.html?id=${decl.id}&opt=view">查看</a>
			            		</security:authorize>
					          	<security:authorize ifAnyGranted="ROLE_DECL_MANAGE">
			            			<a class="deco" href="DeclView.html?id=${decl.id}">监管</a>
			            		</security:authorize>
					          </td>         
					        </tr>
						</c:forEach>
				      </table>
				    </td>
				  </tr>
				</tbody>
				<tr height="30">
				  <td align="center">
				  	<mytag:pagination pager="${map.page}" pageSize="10"  suppressHidden="false"/>
				  </td>
				</tr>
			</table>
        	<security:authorize ifAnyGranted="ROLE_APPLY_CENSOR">
        		<input type="hidden" name="deleteApplyId" id="deleteApplyId">
        	</security:authorize>
	</form>
</div>
</body>
</html>
